<template>  <!-- 待支付 -->
	<view class="view">
		<view class="viewfirst">
			<view class="view1" >
				<view class="view1-1">
					<text>{{arr.user_name}} {{arr.user_tel}}</text>
				</view>
				<view class="view1-2">
					<view>
						体检机构: <text> {{arr.org_Name}}</text>
					</view>
					<view>
						体检时间: <text> {{arr.order_date}}</text>
					</view>
					<view>
						体检单号: <text> {{arr.order_orderId}}</text>
					</view>
				</view>
			</view>
			<view class="view2">
				<view class="view2-1">
					<text>订单编号：{{arr.order_orderId}}</text>
				</view>
				<view class="view2-2">
					<view>
						<text>{{arr.order_orderId}}</text>
						<text>￥{{arr.contentPrice}}</text>
					</view>
					<view>
						<text>{{arr.phy_projectName}}</text>
						<text>￥{{arr.phy_salePrice}}</text>
					</view>
					<view>
						<text style="color:red">合计</text>
						<text style="color:red">￥{{sum}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="view4">
			<button type="primary" plain="true" @click="cancel(id)">取消订单</button>
			<button type="primary" plain="true" @click="go(id)">去支付</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				index:'',
				sum:'',
				arr:{}
			}
		},
		mounted(){
			const value = uni.getStorageSync('id')
			this.$http({   //获取我的体检详细
				url:"/getaccomplishphysical",
				data:{
					order_orderId:value
				}
			}).then((res)=>{
				console.log('获取我的体检详细',res)
				this.arr=res.data[0]
				this.sum=this.arr.contentPrice+this.arr.phy_salePrice
			})
		},
		methods: {
			cancel(b){
					uni.navigateTo({
						url:'/pages/HXM/CancelRefundDetails/CancelRefundDetails',
					})
			},
			go(b){
				uni.navigateTo({
					url:'/pages/FinishPay/FinishPay',
				})
			}
		},
	}
</script>

<style lang="less">
	body{
		background: #F8F8F8;
	}

	.view1{
		font-size: 30rpx;
		margin-bottom: 30rpx;
		border-radius: 10rpx;
		background: white;
		margin: 20rpx;
		.view1-1{
			display: flex;
			padding: 30rpx;
			justify-content: space-between;
			border-bottom: 2rpx solid #C1C1C1;
		}
		.view1-2{
			padding: 30rpx;
			view{
				margin-top: 10rpx;
				text{
					margin-left: 20rpx;
				}
			}
		}
	}
	
	.view2{
		font-size: 30rpx;
		margin-bottom: 30rpx;
		border-radius: 10rpx;
		background: white;
		margin: 20rpx;
		.view2-1{
			display: flex;
			padding: 30rpx;
			justify-content: space-between;
		}
		.view2-2{
			padding: 30rpx;
			border: 2rpx solid #C1C1C1;
			border-radius: 10rpx;
			view{
				margin-top: 10rpx;
				display: flex;
				justify-content: space-between;
				height: 20px;
				text{
					margin-left: 20rpx;
				}
			}
		}
	}
	
	.view4{
		display: flex;
		width: 100%;
		justify-content: center;
		position: fixed;
		bottom: 0;
		left: 0;
		button{
				width: 50%;
				border: 1px solid #59B58D;
				color: #59B58D;
				border-radius: 0;
		}
		button:nth-child(2){
			background: #59B58D;
			color: white;
			border-left: 0;
		}
	}
	
	
</style>